package com.rfid.manager;

import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import com.rfid.acs.bean.LibraryBean;
import com.rfid.acs.net.tcp.TcpClient;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public enum ConfigManager {

    INSTANCE;

    private TcpClient tcpClient;


    private String deviceNo = "afdapp";

    private String readerNo;

    private String readerName;

    private String readerPassword;

    private long timeOffset;

    private LibraryBean libraryBean;

    public void initTcpClient(String ip, int port, String device) {
        setDeviceNo(device);
        tcpClient = new TcpClient.Builder()
                .ip(ip)
                .port(port)
                .device(device)
                .charset("utf-8")
                .build();
    }

    public TcpClient getTcpClient() {
        return tcpClient;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

}
